<?php
/**
 * Created by PhpStorm.
 * User: TS
 * Date: 2017/4/4
 * Time: 20:55
 */
namespace apps\index\controller;

use core\Controller;

class error extends Controller {

    protected $exception;

    public function __construct()
    {
        parent::__construct();
        $this->exception = $GLOBALS['exception'];
    }

    public function error()
    {
        return $this->fetch('error', ['exception' => $this->exception]);
    }

    public function __destruct()
    {
        unset($GLOBALS['exception']);
    }
}


